<template>
  <div id="construction">
    <div class="construc">
      <!-- 头部图片 -->
      <div :style="{ background: `url(${daiy})` }">
        <p>{{ frationlist.name }}</p>
        <p>
          <span>{{ frationlist.houseType }} 厅</span> &nbsp;
          <span>{{ frationlist.decorationStyle }}</span> &nbsp;<span>{{
            frationlist.decorationPrice
          }}</span>
          &nbsp;<span style="padding:0.35rem 0.25rem;">{{ frationlist.houseArea }}m²</span>
        </p>
      </div>
    </div>

    <!-- 主体内容 -->
    <div ref="bigox" style="width: 100%; background: white; height: 100%">
      <div class="evaluateg">
        <!-- 用户信息 -->
        <div class="evaluateone">
          <div class="nextevaluateone">
            <div style="margin-left: 0.4rem">
              <img
                :src="frationlist.icon"
                alt=""
                style="height: 2.5rem; width: 2.5rem; border-radius: 50%"
              />
            </div>
          </div>
        </div>
        <!-- 评价内容 -->
        <div :class="panlen == 2 ? 'evaluatepan' : 'evaluatetwo'" style="">
          <div style="display: flex">
            <p
              style="
                font-size: 0.75rem;
                font-weight: 550;
                letter-spacing: 1px;
                padding-bottom: 0.4rem;
              "
            >
              {{ frationlist.name }}
            </p>
            <p
              style="
                font-size: 0.75rem;
                line-height: 0.8rem;
                height: 1rem;
                border: 2px solid #dfa750;
                width: 4rem;
                text-align: center;
                margin-left: 0.5rem;
                color: #dfa750;
                padding-top: 0.02rem;
              "
            >
              {{
                frationlist.progress == 1
                  ? '开工'
                  : 2
                  ? '水电工程'
                  : 3
                  ? '泥木工程'
                  : 4
                  ? '油漆工程'
                  : 5
                  ? '竣工'
                  : '进驻'
              }}
            </p>
          </div>
          <div style="height: auto">{{ frationlist.content }}</div>
          <div style="">
            <img
              v-for="item in rationtaillist.pictures"
              :key="item.index"
              :src="item"
              alt=""
              style=""
            />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
    <script>
import daiy from '@/assets/images/mehead.jpg';
import { rationtail, rationteam, fration, plant } from '@/api/api';
export default {
  name: 'construction',
  data() {
    return {
      daiy: daiy,
      rationtaillist: '',
      rationteamlist: '',
      frationlist: '',
      panlen: '',
    };
  },
  created() {
    this.getrat();
  },
  methods: {
    getrat() {
      plant({ id: 1 }).then((res) => {
        this.frationlist = res.data.data;
        console.log(res);
      });
    },
  },
  components: {},
};
</script>
<style lang="scss">
* {
  margin: 0;
  padding: 0;
}
body,
html {
  height: 100%;
  background: white;
}
.view-router {
  padding-bottom: 0 !important;
}
.construc {
  div {
    width: 100%;
    height: 8rem;
    p:nth-child(1) {
      padding-top: 1rem;
    }
    p:nth-child(2) {
      padding-top: 0.4rem;
    }
    p {
      font-size: 1.5rem;
     
      letter-spacing: 3px;
      color: white;
      width: 100%;
      text-align: center;
      span {
        // margin-left: 0.5rem;
        font-size: 0.75rem;
        color: white;
        display: inline-block;
        padding: 0.3rem 0.2rem;
        border: 1.5px solid white;
      }
      span:nth-child(4) {
        padding: 0.6rem 0.4rem;
      }
    }
  }
}

// 主体内容
.evaluateg {
  display: flex;
  .evaluateone {
    .nextevaluateone {
      padding-left: 0.6rem;
      padding-top: 1.3rem;
      line-height: 2rem;
      width: 30%;
      p {
        margin: 0.3rem 0.3rem;
      }
    }
  }
  .evaluatetwo {
    height: auto;
    width: 75%;
    padding-top: 1.5rem;
    // border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    margin-left: 0.5rem;
    div:nth-child(1) {
    }
    div:nth-child(2) {
      display: -webkit-box;
      overflow: hidden;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: (5);
    }
    div:nth-child(3) {
      display: flex;
      height: auto;
      padding: 0.5rem 0;
      justify-content: space-between;
      flex-direction: row;
      flex-wrap: wrap;
      img {
        height: 5rem;
        width: 5rem;
        border-radius: 10px;
      }
    }
  }
  .evaluatepan {
    height: auto;
    width: 75%;
    padding-top: 1.5rem;
    // border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    margin-left: 0.5rem;
    div:nth-child(1) {
    }
    div:nth-child(2) {
      display: -webkit-box;
      overflow: hidden;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: (5);
    }
    div:nth-child(3) {
      display: flex;
      height: auto;
      padding: 0.5rem 0;
      justify-content: space-between;
      flex-direction: row;
      flex-wrap: wrap;
      img {
        height: 6.5rem;
        width: 6.5rem;
        border-radius: 10px;
      }
    }
  }
}
</style>